<!-- 搜索框及工具条 -->
<div class="c-head-box">
    <form method="get" action="{:Url('user_list')}">
        <ul>
            <li class="c-head-search">
                <!-- 搜索条件 -->
                <ul>
                    <li style="width: 100%"><span>所在城市：</span>{:widget('common/Select/select_group',array('area',array($area_list,"area_id","acronym","parent_id"),0,$area))}</li>
                    <li><span>用户编号：</span><input type="text" name="user_id" value="{$user_id}"/></li>
                    <li><span>所属代理商编号：</span><input type="text" name="agent_id" value="{$agent_id}"/></li>
                    <li><span>用户昵称：</span><input type="text" name="nick" value="{$nick}"/></li>
                    <li><span>用户电话：</span><input type="text" name="phone" value="{$phone}"/></li>
                    <li><span>用户姓名：</span><input type="text" name="real" value="{$real}"/></li>
                    <li><span>用户身份证号码：</span><input type="text" name="identity" value="{$identity}"/></li>
                    <li><span>是否有社保：</span>{:widget('common/Select/select',array('is_social','is_social',$is_social))}</li>
                    <li><span>是否有公积金：</span>{:widget('common/Select/select',array('is_accumulation_fund','is_accumulation_fund',$is_accumulation_fund))}</li>
                    <li><span>婚姻状况：</span>{:widget('common/Select/select',array('is_marry','is_marry',$is_marry))}</li>
                    <li><span>是否黑户：</span>{:widget('common/Select/select',array('is_white','is_white',$is_white))}</li>
                    <li><span>是否有过贷款：</span>{:widget('common/Select/select',array('is_loan','is_loan',$is_loan))}</li>
                    <li><span>是否当前逾期：</span>{:widget('common/Select/select',array('is_overdue','is_overdue',$is_overdue))}</li>
                    <li><span>是否学生：</span>{:widget('common/Select/select',array('is_student','is_student',$is_student))}</li>
                    <li><span>是否实名：</span>{:widget('common/Select/select',array('is_real','is_real',$is_real))}</li>
                    <li><span>是否有车：</span>{:widget('common/Select/select',array('is_car','is_car',$is_car))}</li>
                    <li><span>是否有房产：</span>{:widget('common/Select/select',array('is_house','is_house',$is_house))}</li>
                    <li><span>是否有信用卡：</span>{:widget('common/Select/select',array('is_credit_card','is_credit_card',$is_credit_card))}</li>
                    <li><span>是否有保单：</span>{:widget('common/Select/select',array('is_policy','is_policy',$is_policy))}</li>
                    <li><span>是否有公司：</span>{:widget('common/Select/select',array('is_company','is_company',$is_company))}</li>
                    <li><span>用户来源：</span>{:widget('common/Select/select',array('source','source',$source))}</li>
                </ul>
            </li>
            <li class="c-head-button">
                <!-- 操作按钮 -->
                <div class="fr"><input type="submit" class="but_blue" value="搜索"></div>
            </li>
        </ul>
    </form>
</div>

<!--用户列表-->
<div class="lists-tab-cont">
    <div class="lists-table">
        <table class="pointer" cellpadding="0" cellspacing="0" border="0">
            <thead>
            <tr>
                <th style="width: 4%;" class="tabSort-header"><a class="tabSort-header-inner"><p>用户编号</p></a></th>
                <th style="width: 50px;" class="tabSort-header"><a class="tabSort-header-inner"><p>头像</p></a></th>
                <th style="width: 8%;" class="tabSort-header"><a class="tabSort-header-inner"><p>昵称</p></a></th>
                <th style="width: 7%;" class="tabSort-header"><a class="tabSort-header-inner"><p>电话</p></a></th>
                <th style="width: 5%;" class="tabSort-header"><a class="tabSort-header-inner"><p>来源</p></a></th>
                <th style="width: 6%;" class="tabSort-header"><a class="tabSort-header-inner"><p>姓名</p></a></th>
                <th style="width: 10%;" class="tabSort-header"><a class="tabSort-header-inner"><p>身份证号</p></a></th>
                <th style="width: 5%;" class="tabSort-header"><a class="tabSort-header-inner"><p>是否黑户</p></a></th>
                <th style="width: 4%;" class="tabSort-header"><a class="tabSort-header-inner"><p>性别</p></a></th>
                <th style="width: 4%;" class="tabSort-header"><a class="tabSort-header-inner"><p>年龄</p></a></th>
                <th style="width: 6%;" class="tabSort-header"><a class="tabSort-header-inner"><p>出生日期</p></a></th>
                <th style="width: 4%;" class="tabSort-header"><a class="tabSort-header-inner"><p>状态</p></a></th>
                <th style="width: 4%;" class="tabSort-header"><a class="tabSort-header-inner"><p>是否实名</p></a></th>
                <th style="width: 4%;" class="tabSort-header"><a class="tabSort-header-inner"><p>是否学生</p></a></th>
                <th style="width: 10%;" class="tabSort-header"><a class="tabSort-header-inner"><p>注册时间</p></a></th>
                <th class="tabSort-header"><a class="tabSort-header-inner"><p>操作</p></a></th>
            </tr>
            </thead>
            <tbody>
            {foreach name="user_list" item="info"}
            <tr>
                <td>{$info.user_id}</td>
                <td>{:widget('common/Images/img',array($info["avatar"],30,30))}</td>
                <td>{$info.nick}</td>
                <td>{$info.phone}</td>
                <td>{:widget('common/Color/Color',array("source",$info['source']))}</td>
                <td>{empty name="info['real']"}--{else/}{$info.real}{/empty}</td>
                <td>{empty name="info['identity']"}--{else/}{$info.identity}{/empty}</td>
                <td>{:widget('common/Color/Color',array("is_white",$info['is_white']))}</td>
                <td>{:widget('common/Color/Color',array("sex",$info['sex']))}</td>
                <td>{empty name="info['age']"}--{else/}{$info.age}{/empty}</td>
                <td>{empty name="info['birthday']"}--{else/}{$info.birthday}{/empty}</td>
                <td>{:widget('common/Color/Color',array("user_status",$info['user_status']))}</td>
                <td>{:widget('common/Color/Color',array("is_real",$info['is_real']))}</td>
                <td>{:widget('common/Color/Color',array("is_student",$info['is_student']))}</td>
                <td>{$info.reg_time}</td>
                <td>
                    <a data-type="info-win" data-src="{:Url('user_info',array('user_id'=>$info['user_id']))}"  data-title="详情" data-width="80%" data-height="80%" class="blue">详情</a>
                    {switch name="info.user_status"}
                    {case value="1"}
                        <a href="{:Url('user_status_del',array('user_id'=>$info['user_id']))}" class="blue info1">禁用</a>
                    {/case}
                    {case value="2"}
                        <a href="{:Url('user_status_reset',array('user_id'=>$info['user_id']))}" class="blue info2"><font color="red">启用</font></a>
                    {/case}
                    {/switch}
                </td>
            </tr>
            {/foreach}
            </tbody>
        </table>
    </div>

    <!-- 翻页模板 -->
    <div class="page">
        {$Think.config.page_html}
    </div>
</div>

<!-- JS处理 -->
<script language="javascript">
    $(function(){
        //提示信息
        $("a.info1").click(function(){
            if(confirm("您确定要禁用该用户吗？")){
                return true;
            }else{
                return false;
            }
        });

        //提示信息
        $("a.info2").click(function(){
            if(confirm("您确定要启用该用户吗？")){
                return true;
            }else{
                return false;
            }
        });

        //提示信息
        $("a.info3").click(function(){
            if(confirm("您确定要将改用户导入用户池吗？")){
                return true;
            }else{
                return false;
            }
        });
    });
</script>